#include "Account.h"
Account* Account::account = nullptr;
Account::Account() : QObject(nullptr)
{
    status = LOGOUT;
    qDebug()<<"账户已生成";
    timer = new QTimer();

    connect( timer, SIGNAL(timeout()),UIManager::getInstance(),SLOT(infoSyncRequest()));

}
void Account::login(QString _name ,QString _uid_me, QString _passwd)
{
    this->name =_name;
    this->uid_me = _uid_me;
    this->passwd = _passwd;
    this->status =LOGIN;


    timer->start( 2000); // 2秒触发定时器
    qDebug()<<"账户已登录";

}
void Account::setGroup(Association ass)
{
    this->list_association_group.push_back(ass);
}
void Account::setFriend(Association ass)
{
    this->list_association_friend.push_back(ass);
    qDebug()<<"现在有"<<list_association_friend.size()<<"个朋友";
}
